<?php

namespace App;

use DateTimeInterface;
use Illuminate\Database\Eloquent\Model;

class Spec extends Model
{
    protected $guarded=[];
    public function goods_type()
    {
        return $this->belongsTo(GoodsType::class,'goods_type_id','id');
    }
    public function spec_items()
    {
        return $this->hasMany(SpecItem::class,'spec_id','id');
    }
    protected function serializeDate(DateTimeInterface $date)
    {
        return $date->format('Y-m-d H:i:s');
    }
}
